﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GSLMS.Services.Interface;
using GSLMS.Entity;
using GSLMS.Entity.DTO;

namespace GSLMS.Services
{
    public class Roles :  IRoles
    {
        private readonly GSLMS.DAL.Oracle.SYS_ROLE dal = new GSLMS.DAL.Oracle.SYS_ROLE();
        public List<Role> GetAll()
        {
            return dal.GetAll();
        }

        public List<Role> GetAll(UniversallySearchParam searchparma)
        {
            return dal.GetAll(searchparma);
        }

        public List<VRolePurview> GetVRolePurviewByID(long id)
        {
            return dal.GetVRolePurviewByID(id);

        }
        public Role GetByID(long id)
        {
            return dal.GetByID(id);
        }
        public bool Add(Role model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 编辑角色信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Update(Role model)
        {
            return dal.Update(model);
        }

        public bool Delete(long id)
        {
            return dal.Delete(id);
        }

        /// <summary>
        /// 分页提取数据
        /// </summary>
        public List<GSLMS.Entity.Role> GetList(GSLMS.Entity.Role searchParam)
        {
            return dal.GetList(searchParam);
        }
    }
}
